<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>wave</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            width: 100%;
            height: 100vh;
            background-color: #000000;
        }


        .container,
        .scene,
        .layer {
            display: block;
            height: 100%;
            width: 100%;
            padding: 0;
            margin: 0;
        }

        .container {
            transform-style: preserve-3d;
            backface-visibility: hidden;
        }

        .scene {
            min-height: 460px;
            position: relative;
            overflow: hidden;
        }

        .layer {
            position: absolute;
        }

        .layer div {
            transform: translate3d(0, 0, 0);
            transform-style: preserve-3d;
            backface-visibility: hidden;
        }

        .background {
            background: url(./static/images2//background.jpg) no-repeat 50% 100%;
            bottom: 96px;
            background-size: cover;
            position: absolute;
            width: 110%;
            left: -5%;
            top: -5%;
            z-index: 1;
        }

        .wave {
            background: transparent repeat-x;
            background-position: center bottom;
            background-size: auto 101%;
            position: absolute;
            width: 300%;
            left: -100%;
            margin: 0px 0px;
            height: 240px;
            transform: translate3d(0, 0, 0);
            transform-style: preserve-3d;
            backface-visibility: hidden;
        }

        .wave:after {
            background-color: #000000;
            position: absolute;
            display: block;
            content: "";
            height: 500px;
            width: 100%;
            top: 100%;
        }

        .wave.plain {
            background-image: url(./static/images2//wave1.png);
        }

        .wave.depth-120 {
            bottom: 120px;
            /* left: -30%; */
            animation: wave 6.22222s 0.1s infinite linear;
        }

        .wave.depth-90 {
            bottom: 90px;
            /* left: -25%; */
            animation: wave 4.22222s 0.1s infinite linear;
        }

        .wave.depth-60 {
            bottom: 60px;
            /* left: -20%; */
            animation: wave 6.22222s 0.1s infinite linear;
        }

        .wave.depth-30 {
            bottom: 30px;
            /* left: -15%; */
            animation: wave 6.22222s 0.1s infinite linear;
        }

        .wave.depth-0 {
            bottom: 0px;
            /* left: -10%; */
            animation: wave 9.22222s 0.1s infinite linear;
        }

        .wave.depth--30 {
            bottom: -30px;
            /* left: -10%; */
            animation: wave 9.22222s 0.1s infinite linear;
        }

        .light {
            background-position: center;
            position: absolute;
            width: 280px;
            height: 280px;
            margin: -80px -190px;

            animation: phase 14s 0.1s infinite linear;
        }

        .light.light1 {
            background-image: url('./static/images2//light1.png');
        }

        .light.light2 {
            background-image: url('./static/images2//light2.png');
        }

        .lighthouse {
            background-image: url('./static/images2//Lighthouse.png');
            background-position: center;
            position: absolute;
            bottom: 160px;
            left: 70%;
            background-size: 224px 392px;
            height: 392px;
            width: 224px;

            animation: lighthouse 4s 0.1s infinite alternate cubic-bezier(0.455, 0.03, 0.515, 0.955)
        }

        @keyframes phase {
            0% {
                opacity: 1;
            }

            25% {
                opacity: 0.4;
            }

            50% {
                opacity: 0.8;
            }

            75% {
                opacity: 0.4;
            }

            100% {
                opacity: 1;
            }
        }

        @keyframes tilt {
            0% {
                -webkit-transform: rotateX(-30deg);
                -moz-transform: rotateX(-30deg);
                transform: rotateX(-30deg);
            }

            25% {
                -webkit-transform: rotateX(30deg);
                -moz-transform: rotateX(30deg);
                transform: rotateX(30deg);
            }

            50% {
                -webkit-transform: rotateY(-30deg);
                -moz-transform: rotateY(-30deg);
                transform: rotateY(-30deg);
            }

            75% {
                -webkit-transform: rotateY(30deg);
                -moz-transform: rotateY(30deg);
                transform: rotateY(30deg);
            }

            100% {
                -webkit-transform: rotateZ(20deg);
                -moz-transform: rotateZ(20deg);
                transform: rotateZ(20deg);
            }
        }

        @keyframes wave {
            0% {
                -webkit-transform: rotateZ(0deg) translate3d(0, 10%, 0) rotateZ(0deg);
                -moz-transform: rotateZ(0deg) translate3d(0, 10%, 0) rotateZ(0deg);
                transform: rotateZ(0deg) translate3d(0, 10%, 0) rotateZ(0deg);
            }

            100% {
                -webkit-transform: rotateZ(360deg) translate3d(0, 10%, 0) rotateZ(-360deg);
                -moz-transform: rotateZ(360deg) translate3d(0, 10%, 0) rotateZ(-360deg);
                transform: rotateZ(360deg) translate3d(0, 10%, 0) rotateZ(-360deg);
            }
        }

        @keyframes lighthouse {
            0% {
                -webkit-transform: translate3d(15%, 0, 0) rotateZ(10deg);
                -moz-transform: translate3d(15%, 0, 0) rotateZ(10deg);
                transform: translate3d(15%, 0, 0) rotateZ(10deg);
            }

            100% {
                -webkit-transform: translate3d(-15%, 0, 0) rotateZ(-10deg);
                -moz-transform: translate3d(-15%, 0, 0) rotateZ(-10deg);
                transform: translate3d(-15%, 0, 0) rotateZ(-10deg);
            }
        }

        @keyframes swing {
            0% {
                -webkit-transform: rotateZ(10deg);
                -moz-transform: rotateZ(10deg);
                transform: rotateZ(10deg);
            }

            100% {
                -webkit-transform: rotateZ(-10deg);
                -moz-transform: rotateZ(-10deg);
                transform: rotateZ(-10deg);
            }
        }

        .text {
            z-index: 999;
            position: absolute;
            top: 40%;
            left: 50%;
            white-space: nowrap;
            font-size: 5vw;
            color: #fff;
            text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3),
                5px 5px 30px rgba(255, 255, 255, 0.6);
            transform: scale(1, 1.1) translate(-50%, 10%);
            padding: 10px 40px;
        }

        .text::before {
            content: "";
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            background-color: #000000;
            z-index: -1;
            opacity: 0.2;
            border-radius: 20px;
        }
    </style>
</head>

<body>
    <section class="container">
        <!-- logo -->
        <div class="text">Penk是个码农</div>

        <!-- 动画 -->
        <ul id="scene" class="scene">
            <!-- 背景 -->
            <li class="layer" data-depth="0.10">
                <div class="background">
                </div>
            </li>

            <!-- 灯光 -->
            <li class="layer" data-depth="0.10">
                <div class="light light1" style="bottom: 200px;left: 30%;">
                </div>
            </li>
            <li class="layer" data-depth="0.10">
                <div class="light light2" style="bottom: 210px;left: 60%;">
                </div>
            </li>
            <li class="layer" data-depth="0.10">
                <div class="light light1" style="bottom: 190px;left: 90%;">
                </div>
            </li>

            <!-- 灯塔 -->
            <li class="layer" data-depth="0.10">
                <div class="lighthouse">
                </div>
            </li>


            <!-- 浪花 -->
            <li class="layer" data-depth="0.40">
                <div class="wave plain depth-120">
                </div>
            </li>
            <li class="layer" data-depth="0.5">
                <div class="wave plain depth-90">
                </div>
            </li>
            <li class="layer" data-depth="0.60">
                <div class="wave plain depth-60">
                </div>
            </li>
            <!-- <li class="layer" data-depth="0.9">
                <div class="wave plain depth-30">
                </div>
            </li> -->
            <li class="layer" data-depth="1.2">
                <div class="wave plain depth-0">
                </div>
            </li>
        </ul>
    </section>

    <script src="./src/js/parallax.js"></script>
    <script>
        function myAwesomeCallback() {
            // alert('Parallax is ready to go now!')
        }

        // the onReady function is called as soon as Parallax knows what input method to use. This might take up to 1000ms (supportDelay * 2) after initialisation
        var scene = document.getElementById('scene')
        var parallax = new Parallax(scene, {
            onReady: myAwesomeCallback
        })
    </script>
</body>

</html>